package by.bsu.fpmi.bbtp.authentication;

import java.util.Arrays;

public class AccessDeniedException extends RuntimeException {
    
    public AccessDeniedException(Class<?> controllerClass, Role[] allowedRoles) {
        super(String.format("You don't have access to %s. Allowed roles: %s.",
                           controllerClass.getSimpleName(), Arrays.toString(allowedRoles)));
    }
}
